<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8"%>
<%@page import="com.stx.crazyblog.entity.User"%>
<%@page import="com.stx.crazyblog.entity.Blogger"%>
<%@page import="com.stx.crazyblog.dao.BloggerDao"%>
<%@page import="java.util.ArrayList"%>


<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>CrazyBlog欢迎界面</title>

<script src="<%=request.getContextPath()%>/js/zhuye.js"
	language="JavaScript"></script>

<!--引入Js文件-->
<link rel="stylesheet" type="text/css"
	href="<%=request.getContextPath()%>/css/zhuye.css" />
</head>
<body>
<span id=localtime></span>
<script type="text/javascript" src="<%=request.getContextPath()%>/js/time.js">
</script>
	<div id="content">
		<fieldset>
			<%--从session中获取当前登录对象 --%>
			<%
				User currentUser = (User) session.getAttribute("currentUser");
			%>
			<legend>
				<%
					if (currentUser != null) {
				%>
				欢迎您，<%=currentUser.getUname()%>
				<a class="btn" href="<%=request.getContextPath()%>/jsp/loginout.jsp">退出</a>
				<%
					} else {
				%>
				请登录： <a class="btn"
					href="<%=request.getContextPath()%>/jsp/login.jsp">重新登录</a>
				<%
					}
				%>
			</legend>
			<div>
				<%
					if (currentUser != null) {
				%>
				<a href="<%=request.getContextPath()%>/jsp/index.jsp"></a>
				<%
					}
				%>
			</div>
		</fieldset>
	</div>
	<div id="main">
	<form action="" method="get">
		<div id="bname">
			<h2 align="left">&nbsp;</h2>
			
			<h2 align="center"><img src="../img/crazy.jpg"></h2>
		</div>
		
		<table width="500" border="0">



			<p>&nbsp;</p>
			<div class="red">
				<div id="slatenav">
					<ul>

						<li><h1>
								<a 
									title="css menus">首页</a>
							</h1></li>
							
							
						
						<li><h1>



								<a href="<%=request.getContextPath()%>/jsp/blog.jsp"
									title="css menus">博文目录</a>

							</h1></li>
							
							<li><h1>



								<a href="<%=request.getContextPath()%>/jsp/cupture.jsp"
									title="css menus">图片</a>

							</h1></li>
							
							
							<li><h1>

								<a href="<%=request.getContextPath()%>/jsp/mima.jsp"
									title="css menus">修改密码</a>



							</h1></li>
							
						<li><h1>

								<a href="<%=request.getContextPath()%>/jsp/geren.jsp"
									title="css menus">关于我</a>



							</h1></li>
					</ul>
				</div>
			</div>

		</table>

	</form>


	<div class=content>
		<div class=left id=dom0>
			<div class=mo id=m0>
			<h1>个人资料&nbsp; &nbsp; &nbsp;  &nbsp; &nbsp; &nbsp;  &nbsp;  &nbsp; &nbsp;   &nbsp;   &nbsp;  &nbsp; &nbsp;  &nbsp;  &nbsp;  &nbsp;  &nbsp;  &nbsp; &nbsp;  &nbsp;  &nbsp;  &nbsp;  &nbsp;  &nbsp; &nbsp;<a href="<%=request.getContextPath()%>/jsp/geren.jsp"> [管理]</h1>
					<div class="nr">
						<p>
							<input name="touxiang" type="image"
								src="<%=request.getContextPath()%>/img/3.jpg">
						</p>
						<p>Crazy博客</p></a>
				<p>&nbsp;</p>
			</div>
		</div>
		<div class=mo id=m1>
			<h1>博文分类</h1>
			<div class="nr">
				<ul>
					<li><a href="<%=request.getContextPath()%>/jsp/blogquanwen.jsp">全部博文</a></li>
					<li><a href="<%=request.getContextPath()%>/jsp/blogquanwen.jsp">私密博文</a></li>
					<li><a href="<%=request.getContextPath()%>/jsp/blogquanwen.jsp">草稿箱</a></li>
					<li><a href="<%=request.getContextPath()%>/jsp/blogquanwen.jsp">回收站</a></li>
					<li><a href="<%=request.getContextPath()%>/jsp/blogquanwen.jsp">博文收藏</a></li>
					<li><a href="<%=request.getContextPath()%>/jsp/geren.jsp">特色博文</a></li>
				</ul>
			</div>
		</div>
		<div class=mo id=m2>
			<h1>留言</h1>
			<div class="nr"></div>
		</div>
		<div class=mo id=m3>
			<h1>友情链接</h1>
			<div class="nr">
			<a href="http://mayibablog.vicp.cc:8088/MaYiTuanDui/">蚂蚁</a><br/>
			<a href="http://14.109.107.198:8080/stx3-mzy">梦之翼</a><br/>
			<a href="http://172.17.252.33:8080/eagleblog/blogQuery">飞鹰</a><br/>
			<a href="http://172.17.252.24:8080/kqblog/">铿锵五人行</a><br/>
			<a href="http://14.109.123.207:8080/HeiTaoKing/jsp/yemianJSP/WD-shouye.jsp">揽月小组</a>
			</div>
		</div>
	</div>
	<div class=center id=dom1>
		<div class=mo id=m4>
			<h1>全部博文</h1>
			<ul>
					<li> 欢迎您在crazy博客安家</li>
			</ul>
			<div class=nr>
			
			</div>
		</div>

		<div class=mo id=m5 >
			

			

				<%
					ArrayList<Blogger> blogList = (ArrayList<Blogger>) request
							.getAttribute("bloggerList");
					if (blogList != null) {
				%>

				<%
					for (Blogger blogger : blogList) {
				%>



				<div class=mo>
					<div class=mo>
						<h3><%=blogger.getTitle()%></h3>
					</div>
					<div class=mo><%=blogger.getContent()%></div>
				</div>
				<%
					}
					}
				%>
			
		</div>

	</div>
	</div>
</body>
</html>